package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@TableName("user")
@ApiModel("用户类")
public class User {
    @TableId(value = "user_id")
    @ApiModelProperty("用户id")
    private int id;
    @TableField("user_name")
    @ApiModelProperty("用户名")
    private String name;
    @TableField("user_pwd")
    @ApiModelProperty("用户密码")
    private String pwd;
    @TableField("user_tel")
    @ApiModelProperty("用户电话")
    private String tel;
    @TableField(value = "user_type")
    @ApiModelProperty("用户类型")
    private int type;

    public User() {
    }

    public User(int id, String name, String pwd, String tel, int type) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.tel = tel;
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", tel='" + tel + '\'' +
                ", type=" + type +
                '}';
    }
}
